home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / Other Langs / Tickle-4.0 (tcl) / library / help / tcl / control / for < prev    next >
Encoding:
Text File  |  1993-10-26  |  1.2 KB  |  26 lines  |  [TEXT/$Tcl]

  1.  
  2.           for start test next body
  3.  
  4.  
  5.      DESCRIPTION
  6.           For is a looping command, similar in structure to the C  for
  7.           statement.   The start, next, and body arguments must be Tcl
  8.           command strings, and test is an expression string.  The  for
  9.           command  first invokes the Tcl interpreter to execute start.
  10.           Then it repeatedly evaluates test as an expression;  if  the
  11.           result  is  non-zero it invokes the Tcl interpreter on body,
  12.           then invokes the Tcl interpreter on next, then  repeats  the
  13.           loop.   The command terminates when test evaluates to 0.  If
  14.           a continue command is invoked within body then any remaining
  15.           commands  in the current execution of body are skipped; pro-
  16.           cessing continues by invoking the Tcl interpreter  on  next,
  17.           then  evaluating  test,  and  so  on.  If a break command is
  18.           invoked within body or  next,  then  the  for  command  will
  19.           return immediately.  The operation of break and continue are
  20.           similar to the corresponding statements in C.   For  returns
  21.           an empty string.
  22.  
  23.  
  24.      KEYWORDS
  25.           for, iteration, looping
  26.